package com.example.demo.domain;

import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

@Data
@AllArgsConstructor
@NoArgsConstructor
public class Result {
    private int code;
    private String msg;
    private Object data;

    public static Result ok() {
        return new Result(200, "ok",null);
    }

    public static Result ok(Object data) {
        return new Result(200, "ok",data);
    }

    public static Result error() {
        return new Result(500, "error",null);
    }
}
